// MESSAGE KF_ZK support class

#pragma once

namespace mavlink {
namespace fppa {
namespace msg {

/**
 * @brief KF_ZK message
 *
 * kF_ZK
 */
struct KF_ZK : mavlink::Message {
    static constexpr msgid_t MSG_ID = 29;
    static constexpr size_t LENGTH = 240;
    static constexpr size_t MIN_LENGTH = 240;
    static constexpr uint8_t CRC_EXTRA = 237;
    static constexpr auto NAME = "KF_ZK";


    std::array<float, 15> Zk; /*<  Zk */
    std::array<float, 15> Hk; /*<  Hk */
    std::array<float, 15> Vk; /*<  Vk */
    std::array<float, 15> R; /*<  R */


    inline std::string get_name(void) const override
    {
            return NAME;
    }

    inline Info get_message_info(void) const override
    {
            return { MSG_ID, LENGTH, MIN_LENGTH, CRC_EXTRA };
    }

    inline std::string to_yaml(void) const override
    {
        std::stringstream ss;

        ss << NAME << ":" << std::endl;
        ss << "  Zk: [" << to_string(Zk) << "]" << std::endl;
        ss << "  Hk: [" << to_string(Hk) << "]" << std::endl;
        ss << "  Vk: [" << to_string(Vk) << "]" << std::endl;
        ss << "  R: [" << to_string(R) << "]" << std::endl;

        return ss.str();
    }

    inline void serialize(mavlink::MsgMap &map) const override
    {
        map.reset(MSG_ID, LENGTH);

        map << Zk;                            // offset: 0
        map << Hk;                            // offset: 60
        map << Vk;                            // offset: 120
        map << R;                             // offset: 180
    }

    inline void deserialize(mavlink::MsgMap &map) override
    {
        map >> Zk;                            // offset: 0
        map >> Hk;                            // offset: 60
        map >> Vk;                            // offset: 120
        map >> R;                             // offset: 180
    }
};

} // namespace msg
} // namespace fppa
} // namespace mavlink
